<%@taglib prefix = "c" uri = "http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix = "fmt" uri = "http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix = "fn" uri = "http://java.sun.com/jsp/jstl/functions"%>

<h2><fmt:message key = "form.RequestDetails"/></h2>

<div class = "messages"><jsp:include page = "/messages.jsp"/></div>

   <table class = "form">
      <tr>
         <td class = "label"><fmt:message key = "request.id"/></td>
         <td><c:out value = "${requestBean.id}"/></td>
      </tr>

      <tr>
         <td class = "label"><fmt:message key = "request.status"/></td>
         <td><c:out value = "${requestBean.requestStatus.status}"/></td>
      </tr>
      
      <tr>
         <td class = "label"><fmt:message key = "request.priority"/></td>
         <td><c:out value = "${requestBean.priorityBean.value}"/></td>
      </tr>
   
      <tr>
         <td class = "label"><fmt:message key = "request.regNumber"/></td>
         <td><c:out value = "${requestBean.regNumber}"/></td>
      </tr>
   
      <tr>
         <td class = "label"><fmt:message key = "request.organization"/></td>
         <td><c:out value = "${requestBean.organization.fullTitle}"/></td>
      </tr>
      
      <tr>
         <td class = "label"><fmt:message key = "request.department"/></td>
         <td><c:out value = "${requestBean.department.name}"/></td>
      </tr>
            
      <tr>
         <td class = "label"><fmt:message key = "request.client"/></td>
         <td>
            <c:out value = "${requestBean.client.lastName}"/>&nbsp;
            <c:out value = "${requestBean.client.firstName}"/>&nbsp;
            <c:out value = "${requestBean.client.middleName}"/>
         </td>
      </tr>
      
      <tr>
         <td class = "label"><fmt:message key = "client.email1"/></td>
         <td>
            <c:out value = "${requestBean.client.email1}"/>
         </td>
      </tr>
      
      <tr>
         <td class = "label"><fmt:message key = "client.tel1"/></td>
         <td>
            <c:out value = "${requestBean.client.tel1}" default='---'/><br>
            <c:out value = "${requestBean.client.tel2}"/><br>
            <c:out value = "${requestBean.client.tel3}"/>
         </td>
      </tr>
      
      <tr>
         <td class = "label"><fmt:message key = "request.room"/></td>
         <td><c:out value = "${requestBean.room}"/></td>
      </tr>
      
      <tr>
         <td class = "label"><fmt:message key = "request.text"/></td>
         <td class = "textField"><c:out value = "${requestBean.clientText}"/></td>
      </tr>     
      
      <tr>
         <td class = "label"><fmt:message key = "request.dispatcherText"/></td>
         <td class = "textField"><c:out value = "${requestBean.dispatcherText}"/></td>
      </tr>

      <tr>
         <td class = "label"><fmt:message key = "request.group"/></td>
         <td><c:out value = "${requestBean.group.name}"/></td>
      </tr>               
      
      <tr>
         <td class = "label"><fmt:message key = "request.requestType"/></td>
         <td><c:out value = "${requestBean.requestType.type}"/></td>
      </tr>            
      
      <tr>
         <td class = "label"><fmt:message key = "request.regDate"/></td>
         <td><fmt:formatDate value="${requestBean.registrationDate}" pattern="dd.MM.yyyy HH:mm"/></td>
      </tr>
      
      <tr>
         <td class = "label"><fmt:message key = "request.approxEndDate"/></td>
         <td>
           <fmt:formatDate value="${requestBean.approxEndDate}" 
           pattern="dd.MM.yyyy"/>
         </td>
      </tr>
      
      <tr>
         <td class = "label"><fmt:message key = "request.realEndDate"/></td>
         <td>
            <fmt:formatDate value="${requestBean.realEndDate}" pattern="dd.MM.yyyy HH:mm"/>
         </td>
      </tr>
      
      <tr>
         <td class = "label"><fmt:message key = "request.leadExecutor"/></td>
         <td>
            <c:out value = "${requestBean.leadExecutor.lastName}"/>&nbsp;
            <c:out value = "${requestBean.leadExecutor.firstName}"/>&nbsp;
            <c:out value = "${requestBean.leadExecutor.middleName}"/> 
         </td>
      </tr>
      
      <tr>
         <td class = "label"></td>
         <td>
            <c:out value = "${requestBean.leadExecutor.email}"/> 
         </td>
      </tr>
      
      <tr>
         <td class = "label"><fmt:message key = "request.report"/></td>
         <td><c:out value = "${requestBean.leadExecutorReport}"/></td>
      </tr>
      
      <tr>
         <td class = "label"><fmt:message key = "request.comment"/></td>
         <td><c:out value = "${requestBean.comment}"/></td>
      </tr>      
</table>